34 research outputs found

    The Ciao clp(FD) library. A modular CLP extension for Prolog

    Get PDF
    We present a new free library for Constraint Logic Programming over Finite Domains, included with the Ciao Prolog system. The library is entirely written in Prolog, leveraging on Ciao's module system and code transformation capabilities in order to achieve a highly modular design without compromising performance. We describe the interface, implementation, and design rationale of each modular component. The library meets several design goals: a high level of modularity, allowing the individual components to be replaced by different versions; highefficiency, being competitive with other TT> implementations; a glass-box approach, so the user can specify new constraints at different levels; and a Prolog implementation, in order to ease the integration with Ciao's code analysis components. The core is built upon two small libraries which implement integer ranges and closures. On top of that, a finite domain variable datatype is defined, taking care of constraint reexecution depending on range changes. These three libraries form what we call the TT> kernel of the library. This TT> kernel is used in turn to implement several higher-level finite domain constraints, specified using indexicals. Together with a labeling module this layer forms what we name the TT> solver. A final level integrates the CLP (J7©) paradigm with our TT> solver. This is achieved using attributed variables and a compiler from the CLP (J7©) language to the set of constraints provided by the solver. It should be noted that the user of the library is encouraged to work in any of those levels as seen convenient: from writing a new range module to enriching the set of TT> constraints by writing new indexicals

    Towards modular extensions for a modular language

    Get PDF
    Modularity allows the construction of complex designs from simpler, independent units that most of the time can be developed separately. In this paper we are concerned with developing mechanisms for easily implementing modular extensions to modular (logic) languages. By (language) extensions we refer to different groups of syntactic definitions and translation rules that extend a language. Our application of the concept of modularity in this context is twofold. We would like these extensions to be modular, in the above sense, i.e., we should be able to develop different extensions mostly separately. At the same time, the sources and targets for the extensions are modular languages, i.e., such extensions may take as input separate pieces of code and also produce separate pieces of code. Dealing with this double requirement involves interesting challenges to ensure that modularity is not broken: first, combinations of extensions (as if they were a single extension) must be given a precise meaning. Also, the separate translation of multiple sources (as if they were a single source) must be feasible. We present a detailed description of a code expansion-based framework that proposes novel solutions for these problems. We argue that the approach, while implemented for Ciao, can be adapted for other languages and Prolog-based systems

    The IACOB project. VI. On the elusive detection of massive O-type stars close to the ZAMS

    Full text link
    The apparent lack of massive O-type stars near the zero-age main sequence (at ages < 2 Myr) is a topic widely discussed. Different explanations for this elusive detection have been proposed, but no firm conclusions have been reached yet. We reassess this empirical result benefiting from the high-quality spectroscopic observations of >400 Galactic O-type stars gathered by the IACOB and OWN surveys. We used temperatures and gravities from a iacob-gbat/fastwind spectroscopic analysis to locate our sample in the Kiel and spectroscopic HR diagrams. We evaluated the completeness of our sample of stars, observational biases using information from the Galactic O star catalog (GOSC), systematics of our methodology, and compare with other recent studies using smaller samples of Galactic O-type stars. We base our discussion on the spectroscopic HR diagram to avoid the use of uncertain distances. We performed a detailed study of the young cluster Trumpler-14 as an example of how Gaia cluster distances can help to construct the associated classical HR diagram. The apparent lack of massive O-type stars near the ZAMS with masses between 30 and 70 Msol persist even when spectroscopic results from a large, non-biased sample of stars are used. We do not find correlation between the dearth of stars and observational biases, limitations of our methodology, or the use of spectroscopic HR diagram instead of the classical one. Investigating the efficiency of mass accretion during the formation process we conclude that an adjustment of the accretion rate towards lower values could reconcile the hotter boundary of detected O-type stars and the theoretical birthline. Last, we discuss that the presence of a small sample of O2-O3.5 stars found closer to the ZAMS might be explained taking into account non-standard star evolution (e.g. binary interaction, mergers, or homogeneous evolution).Comment: 20 pages, 15 figures, accepted for publication in Astronomy & Astrophysic

    Exploiting Term Hiding to Reduce Run-time Checking Overhead

    Full text link
    One of the most attractive features of untyped languages is the flexibility in term creation and manipulation. However, with such power comes the responsibility of ensuring the correctness of these operations. A solution is adding run-time checks to the program via assertions, but this can introduce overheads that are in many cases impractical. While static analysis can greatly reduce such overheads, the gains depend strongly on the quality of the information inferred. Reusable libraries, i.e., library modules that are pre-compiled independently of the client, pose special challenges in this context. We propose a technique which takes advantage of module systems which can hide a selected set of functor symbols to significantly enrich the shape information that can be inferred for reusable libraries, as well as an improved run-time checking approach that leverages the proposed mechanisms to achieve large reductions in overhead, closer to those of static languages, even in the reusable-library context. While the approach is general and system-independent, we present it for concreteness in the context of the Ciao assertion language and combined static/dynamic checking framework. Our method maintains the full expressiveness of the assertion language in this context. In contrast to other approaches it does not introduce the need to switch the language to a (static) type system, which is known to change the semantics in languages like Prolog. We also study the approach experimentally and evaluate the overhead reduction achieved in the run-time checks.Comment: 26 pages, 10 figures, 2 tables; an extension of the paper version accepted to PADL'18 (includes proofs, extra figures and examples omitted due to space reasons

    Different subcellular localizations and functions of Arabidopsis myosin VIII

    Get PDF
    <p>Abstract</p> <p>Background</p> <p>Myosins are actin-activated ATPases that use energy to generate force and move along actin filaments, dragging with their tails different cargos. Plant myosins belong to the group of unconventional myosins and Arabidopsis myosin VIII gene family contains four members: ATM1, ATM2, myosin VIIIA and myosin VIIIB.</p> <p>Results</p> <p>In transgenic plants expressing GFP fusions with ATM1 (IQ-tail truncation, lacking the head domain), fluorescence was differentially distributed: while in epidermis cells at the root cap GFP-ATM1 equally distributed all over the cell, in epidermal cells right above this region it accumulated in dots. Further up, in cells of the elongation zone, GFP-ATM1 was preferentially positioned at the sides of transversal cell walls. Interestingly, the punctate pattern was insensitive to brefeldin A (BFA) while in some cells closer to the root cap, ATM1 was found in BFA bodies. With the use of different markers and transient expression in <it>Nicotiana benthamiana </it>leaves, it was found that myosin VIII co-localized to the plasmodesmata and ER, colocalized with internalized FM4-64, and partially overlapped with the endosomal markers ARA6, and rarely with ARA7 and FYVE. Motility of ARA6 labeled organelles was inhibited whenever associated with truncated ATM1 but motility of FYVE labeled organelles was inhibited only when associated with large excess of ATM1. Furthermore, GFP-ATM1 and RFP-ATM2 (IQ-tail domain) co-localized to the same spots on the plasma membrane, indicating a specific composition at these sites for myosin binding.</p> <p>Conclusion</p> <p>Taken together, our data suggest that myosin VIII functions differently in different root cells and can be involved in different steps of endocytosis, BFA-sensitive and insensitive pathways, ER tethering and plasmodesmatal activity.</p

    Confluence Modulo Equivalence in Constraint Handling Rules

    Get PDF
    Previous results on proving confluence for Constraint Handling Rules are extended in two ways in order to allow a larger and more realistic class of CHR programs to be considered confluent. Firstly, we introduce the relaxed notion of confluence modulo equivalence into the context of CHR: while confluence for a terminating program means that all alternative derivations for a query lead to the exact same final state, confluence modulo equivalence only requires the final states to be equivalent with respect to an equivalence relation tailored for the given program. Secondly, we allow non-logical built-in predicates such as var/1 and incomplete ones such as is/2, that are ignored in previous work on confluence. To this end, a new operational semantics for CHR is developed which includes such predicates. In addition, this semantics differs from earlier approaches by its simplicity without loss of generality, and it may also be recommended for future studies of CHR. For the purely logical subset of CHR, proofs can be expressed in first-order logic, that we show is not sufficient in the present case. We have introduced a formal meta-language that allows reasoning about abstract states and derivations with meta-level restrictions that reflect the non-logical and incomplete predicates. This language represents subproofs as diagrams, which facilitates a systematic enumeration of proof cases, pointing forward to a mechanical support for such proofs

    Static Analysis-based Debugging, Certification, Testing, and Optimization with CiaoPP

    Get PDF
    Facilitate the development of safe, efficient programs. Approach: •Next-generation, higher-level, multiparadigm prog. languages. •Improved program development environments. •A framework (CiaoPP) which integrates: •Debugging. •Verification and certification. •Testing. •Optimization (optimized compilation, parallelization, ...

    Modules for Prolog Revisited

    Get PDF
    Module systems are an essential feature of programming languages as they facilitate the re-use of existing code and the development of general purpose libraries. Unfortunately, there has been no consensual module system for Prolog, hence no strong development of libraries, in sharp contrast to what exists in Java for instance. One difficulty comes from the call predicate which interferes with the protection of the code, an essential task of a module system. By distinguishing the called module code protection from the calling module code protection, we review the existing syntactic module systems for Prolog. We show that no module system ensures both forms of code protection, with the noticeable exceptions of Ciao-Prolog and XSB. We then present a formal module system for logic programs with calls and closures, define its operational semantics and formally prove the code protection property. Interestingly, we also provide an equivalent logical semantics of modular logic programs without calls nor closures, which shows how they can be translated into constraint logic programs over a simple module constraint system
    corecore